﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CadastroPF.aspx.cs"
    Inherits="Ecommerce.Web.Cliente.CadastroPF" EnableViewState="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../Scripts/jquery.maskedinput-1.3.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=txtCPF.ClientID%>").mask(
                '999.999.999-99',
                { placeholder: " " }
            );

            $("#<%=txtRG.ClientID%>").mask(
                '99999999?999999',
                { placeholder: " " }
            );

            $("#<%=txtNumero.ClientID%>").mask(
                '9?99999',
                { placeholder: " " }
            );

            $("#<%=txtCEP.ClientID%>").mask(
                '99999-999',
                { placeholder: " " }
            );

            $("#<%=txtTelefone.ClientID%>").mask(
                '99999999',
                { placeholder: " " }
            );

            $("#<%=txtDDD.ClientID%>").mask(
                '99',
                { placeholder: " " }
            );

            $("#<%=rbPF.ClientID%>").click(function () {
                $("#box_dados_gerais_pj").css("display", "none");
                $("#box_dados_gerais_pf").css("display", "block");
            });

            $("#<%=rbPJ.ClientID%>").click(function () {
                $("#box_dados_gerais_pj").css("display", "block");
                $("#box_dados_gerais_pf").css("display", "none");
            });
        });

        $(document).ready(function () {
            $('input').keypress(function (e) {
                var code = null;
                code = (e.keyCode ? e.keyCode : e.which);
                return (code == 13) ? false : true;
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TopoContent" runat="server">
    <div class="tit_tela">Cadastro</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="miolo_carrinho_b">
        <div class="top_box_carrinho_inf">
            <img src="images/spacer.gif" width="1" height="1" />
        </div>
        <div class="miolo_box_carrinho_inf_b">
            <div class="box_cadastro">

                <% /***************** TIPO DE CADASTRO *****************/ %>                
                <div class="box_passos">
                    <div class="number_passo1"></div>
                    <div class="txt_box_passos">TIPO DE CADASTRO</div>
                </div>                
                <div class="box_tipo_cadastro">
                    <asp:RadioButton ID="rbPF" runat="server" Text="Pessoa Física" GroupName="tipoCadastro" TextAlign="Left" Checked="true" />
                    <asp:RadioButton ID="rbPJ" runat="server" Text="Pessoa Jurídica" GroupName="tipoCadastro" TextAlign="Left" />
                </div>

                <% /***************** DADOS GERAIS *****************/ %>
                <div class="box_passos">
                    <div class="number_passo2"></div>
                    <div class="txt_box_passos">DADOS GERAIS</div>
                </div>
                <div class="box_dados_gerais_pf" id="box_dados_gerais_pf" runat="server">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td width="356" height="34">
                                <asp:Label ID="Label12" runat="server" Text="Nome:"></asp:Label>
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td height="38" colspan="2">
                                <asp:TextBox ID="txtNome" runat="server" CssClass="box_formulario_input_b" MaxLength="200"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td height="21" valign="bottom">
                                <asp:Label ID="Label13" runat="server" Text="CPF:"></asp:Label>
                                <asp:CustomValidator ID="cvCpf" runat="server" ErrorMessage="Informe o CPF" 
                                    ControlToValidate="txtCPF" onservervalidate="cvCpf_ServerValidate"></asp:CustomValidator>
                            </td>
                            <td valign="bottom">
                                <asp:Label ID="Label14" runat="server" Text="RG:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td height="38" valign="bottom">
                                <asp:TextBox ID="txtCPF" runat="server" CssClass="box_formulario_input_a" MaxLength="11"></asp:TextBox>
                            </td>
                            <td valign="bottom">
                                <asp:TextBox ID="txtRG" runat="server" CssClass="box_formulario_input_a" MaxLength="14"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td height="34" valign="bottom">
                                <asp:Label ID="Label15" runat="server" Text="Sexo:"></asp:Label>
                            </td>
                            <td valign="bottom">
                                <asp:Label ID="Label16" runat="server" Text="Data de Nascimento:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="rbMasculino" runat="server" Text="Masculino" GroupName="Sexo" TextAlign="Left" Checked="true" />
                                <asp:RadioButton ID="rbFeminino" runat="server" Text="Feminino" GroupName="Sexo" TextAlign="Left" />
                            </td>
                            <td>
                                <asp:TextBox ID="txtDiaNascimento" runat="server" CssClass="box_formulario_input_a" MaxLength="2" Width="30px"></asp:TextBox>&nbsp;&nbsp;
                                <asp:TextBox ID="txtMesNascimento" runat="server" CssClass="box_formulario_input_a" MaxLength="2" Width="30px"></asp:TextBox>&nbsp;&nbsp;
                                <asp:TextBox ID="txtAnoNascimento" runat="server" CssClass="box_formulario_input_a" MaxLength="4" Width="60px"></asp:TextBox>                            
                            </td>
                        </tr>
                    </table>
                </div>

                <div class="box_dados_gerais_pj" id="box_dados_gerais_pj" runat="server">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td width="356" height="34">
                                <asp:Label ID="Label1" runat="server" Text="Razão Social:"></asp:Label>
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td height="38" colspan="2">
                                <asp:TextBox ID="txtRazaoSocial" runat="server" CssClass="box_formulario_input_b" MaxLength="200"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td height="21" valign="bottom">
                                <asp:Label ID="Label2" runat="server" Text="CNPJ:"></asp:Label>
                            </td>
                            <td valign="bottom">
                                <asp:Label ID="Label17" runat="server" Text="IE:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td height="38" valign="bottom">
                                <asp:TextBox ID="txtCNPJ" runat="server" CssClass="box_formulario_input_a" MaxLength="11"></asp:TextBox>
                            </td>
                            <td valign="bottom">
                                <asp:TextBox ID="txtIE" runat="server" CssClass="box_formulario_input_a" MaxLength="14"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td height="34" colspan="2" valign="bottom">
                                <asp:Label ID="Label18" runat="server" Text="Nome Contato:"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:TextBox ID="txtNomeContato" runat="server" CssClass="box_formulario_input_a"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>

                <% /***************** ENDEREÇO DE ENTREGA *****************/ %>
                <div class="box_passos">
                    <div class="number_passo3"></div>
                    <div class="txt_box_passos">ENDEREÇO DE ENTREGA</div>
                </div>
                    <div class="box_endereco_entrega">
                        <table width="100%">
                            <tr>
                                <td colspan="2"><asp:Label ID="Label3" runat="server" Text="CEP:*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td colspan="2"><asp:TextBox ID="txtCEP" runat="server" CssClass="box_formulario_input_a" Width="160px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td colspan="2"><asp:Label ID="Label4" runat="server" Text="Tipo Endereço:*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:DropDownList ID="ddlTipoEndereco" Width="200px" CssClass="box_formulario_input_a" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="Label5" runat="server" Text="Endereço:*"></asp:Label></td>
                                <td><asp:Label ID="Label6" runat="server" Text="Número:*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td><asp:TextBox ID="txtEndereco" runat="server" CssClass="box_formulario_input_a" Width="350px"></asp:TextBox></td>
                                <td><asp:TextBox ID="txtNumero" runat="server" CssClass="box_formulario_input_a" Width="150px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="Label7" runat="server" Text="Complemento:*"></asp:Label></td>
                                <td><asp:Label ID="Label8" runat="server" Text="Bairro:*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td><asp:TextBox ID="txtComplemento" runat="server" CssClass="box_formulario_input_a" Width="350px"></asp:TextBox></td>
                                <td><asp:TextBox ID="txtBairro" runat="server" CssClass="box_formulario_input_a" Width="150px"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td><asp:Label ID="Label9" runat="server" Text="Cidade:*"></asp:Label></td>
                                <td><asp:Label ID="Label10" runat="server" Text="Estado:*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td><asp:TextBox ID="txtCidade" runat="server" CssClass="box_formulario_input_a" Width="350px"></asp:TextBox></td>
                                <td>
                                    <asp:DropDownList ID="ddlUF" Width="150px" CssClass="box_formulario_input_a" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"><asp:Label ID="Label11" runat="server" Text="Telefone:*"></asp:Label></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:TextBox ID="txtDDD" runat="server" CssClass="box_formulario_input_a" Width="34px"></asp:TextBox>&nbsp;
                                    <asp:TextBox ID="txtTelefone" runat="server" CssClass="box_formulario_input_a" Width="130px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>

                <% /***************** DADOS DE ACESSO *****************/ %>
                <div class="box_passos">
                    <div class="number_passo4"></div>
                    <div class="txt_box_passos">DADOS DE ACESSO</div>
                </div>
                <div class="box_formulario">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="356" height="34">
                                Email:
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                    ErrorMessage="informe um email válido" ControlToValidate="txtEmail" 
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                <asp:CustomValidator ID="cvEmail" runat="server" 
                                    ErrorMessage="email já cadastrado" ControlToValidate="txtEmail" 
                                    onservervalidate="cvEmail_ServerValidate"></asp:CustomValidator>
                            </td>
                            <td width="304">
                                Confirmar email:
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ErrorMessage="*" ControlToValidate="txtConfirmarEmail"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="emails digitados são diferentes" ControlToCompare="txtEmail" ControlToValidate="txtConfirmarEmail"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td height="38">
                                <asp:TextBox ID="txtEmail" runat="server" CssClass="box_formulario_input_a" MaxLength="100"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtConfirmarEmail" runat="server" CssClass="box_formulario_input_a" MaxLength="100"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td width="356" height="34">
                                Senha:
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="*" ControlToValidate="txtSenha"></asp:RequiredFieldValidator>
                            </td>
                            <td width="304">
                                Confirmar senha:
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ErrorMessage="*" ControlToValidate="txtConfirmarSenha"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="senhas digitadas são diferentes" ControlToCompare="txtSenha" ControlToValidate="txtConfirmarSenha"></asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td height="38">
                                <asp:TextBox ID="txtSenha" runat="server" CssClass="box_formulario_input_a" MaxLength="10" TextMode="Password"></asp:TextBox>
                            </td>
                            <td>
                                <asp:TextBox ID="txtConfirmarSenha" runat="server" CssClass="box_formulario_input_a" MaxLength="10" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <div class="txt_red_form">
                        *Campos obrigatórios</div>
                    <div class="bt_continue_b">
                        <div class="txt_menu_c" style="z-index:-10000">
                            <asp:LinkButton ID="lbSalvar" runat="server" Text="Continuar" 
                                onclick="lbSalvar_Click"></asp:LinkButton>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <div class="bottom_box_carrinho_inf">
            <img src="images/spacer.gif" alt="" width="1" height="1" />
        </div>
    </div>
</asp:Content>
